/**$Licence:
 *   Use this however/wherever you like, just don't blame me if it breaks anything.
 *   Copyright (C) 2008 - 2013 xingsheng.zhu@gmail.com All rights reserved.
 */
package com.blazegame.robot.action;

import org.apache.mina.core.session.IoSession;

import com.blazemina.CommandContext;
import com.blazemina.command.Command;
import com.blazemina.config.annotation.CommandMapping;
import com.blazemina.message.Message;

/**
 * @author JackChu
 * @version 1.0.0 2013-3-8 下午2:28:31
 */
public class TestAction implements Command{
	
	@CommandMapping(command="u_login")
	public void login(CommandContext context){
		System.err.println("robot login");
	}
	
	@CommandMapping(command="u_create")
	public void create(CommandContext context){
		System.err.println("robot u_create");
		Message message = context.getMessage();
		IoSession session = context.getSession();
		message.setCommand("u_login");
		session.write(message);
	}

}
